package com.xiaomiMall.mange.service.Impl;

import com.xiaomiMall.mange.domain.Notable;
import com.xiaomiMall.mange.domain.Prod;
import com.xiaomiMall.mange.mapper.NotableMapper;
import com.xiaomiMall.mange.service.NotableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class NotableServiceImpl implements NotableService {

    @Autowired
    private NotableMapper notableMapper;

    /**走马灯及下方图片地址 */
    @Override
    public List<Notable> selectNotableAddress()
    {
        return notableMapper.selectNotableAddress();
    }

    /**导航菜单图片地址 */
    @Override
    public List<Prod> selectAll_1() {
        return notableMapper.selectAll_1();
    }

    /** 查询走马灯图片 */
    @Override
    public List<Notable> selectAll() {
        return notableMapper.selectAll();
    }

    @Override
    public int deleteNotableById(Long notableId) {
        return notableMapper.deleteNotableById(notableId);
    }

    @Override
    public int deleteNotableByIds(Long[] notableIds) {
        return notableMapper.deleteNotableByIds(notableIds);
    }


    /** 新增图片 */
    @Override
    public int insertNotable(Notable notable)
    {
        return notableMapper.insertNotable(notable);
    }

    /**更换图片 */
    @Override
    public int updateNotable(Notable notable) {
        return notableMapper.updateNotable(notable);
    }


}
